package com.yzh.croom.mapper;

import com.yzh.croom.model.domain.Room;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface RoomMapper {
    @Select("select * from tb_room")
    public List<Room> getAllRoom();

    @Select("select * from tb_room where room_id=#{roomId}")
    public Room getRoomById(String roomId);

    @Insert("insert into tb_room (room_id,room_size,room_des,room_loc) values (#{roomId},#{roomSize},#{roomDes},#{roomLoc})")
    public int addRoom(Room room);
}
